<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			{{name}}{{age}}{{address}}
			<div>{{colors}}</div>
			<div>{{colors[1]}}</div>
			<div>{{girlFriend.name}}</div>
			<div>运算符:</div>
			<div>{{3+3}}</div>
			<div>{{add(1,2)}}</div>
			<div>{{show(666666666666)}}</div>
			<div>三目</div>
			<div>{{age>18?"成年":"未成年"}}</div>
			<div>{{name.length}}</div>
			<div>{{name.substring(1)}}</div>
			<div>{{"666"+name}}</div>
			<div>{{date.getFullYear()+date.getMonth()}}</div>
		</div>
	</body>
	<script>
		new Vue({
			el:"#app",
			data:{
				name:"sunyihan",
				age:"6666",
				address:"666666",
				date:new Date(),
				colors:["red","green","blue"],
				girlFriend:{
					name:"6",
					age:16,
					address:"26"
				}
			},
			methods:{
				add:function(a,b){
					return a+b;
				},
				show:function(a){
					alert(a);
				}
			}
		})
	</script>
</html>
